import request from '@/utils/request';

/**
 * 获取职级列表
 */
export const getLevelList_API = async (params: any) => await request.post('/api/getLevelList', params);

/**
 * 获取职级详情
 */
export const getLevelDetail_API = async (params: any) => await request.get(`/api/getLevelDetail/${params.levelId}`);

/**
 * 添加职级（仅管理员）
 */
export const addLevel_API = async (params: any) => await request.post('/api/addLevel', params);

/**
 * 删除职级（仅管理员）
 */
export const deleteLevel_API = async (params: any) => await request.delete(`/api/deleteLevel/${params.levelId}`);

/**
 * 修改职级（仅管理员）
 */
export const updateLevel_API = async (params: any) => await request.put(`/api/updateLevel/${params.levelId}`, params);


export default {
    getLevelList_API,
    getLevelDetail_API,
    addLevel_API,
    deleteLevel_API,
    updateLevel_API
}